Enable Ethernet
This guide provides steps to enable the Ethernet interface (enp8s0
) and use it instead of the Wi-Fi interface (wlp2s0
) on Ubuntu Server 24.04.
Steps to Enable Ethernet and Switch from Wi-Fi
-
Verify Ethernet Interface Status
Run the following command to confirm the current network interfaces:ip link
You should see
enp8s0
(Ethernet) andwlp2s0
(Wi-Fi). Note the state ofenp8s0
(likelyDOWN
). Your devices may be different based on the hardware. -
Enable the Ethernet Interface
Bring the Ethernet interface up:sudo ip link set enp8s0 up
This enables the interface, but it still needs an IP address.
-
Configure Ethernet to Use DHCP
Ubuntu Server 24.04 uses Netplan for network configuration. Check if the Ethernet interface is configured in the Netplan configuration file, typically located at/etc/netplan/
.List the Netplan configuration files:
ls /etc/netplan/
You’ll likely see a file like
00-installer-config.yaml
or01-netcfg.yaml
.Edit the Netplan configuration file (e.g.,
00-installer-config.yaml
) using a text editor likenano
:sudo nano /etc/netplan/00-installer-config.yaml
Ensure the file includes the Ethernet interface (
enp8s0
) configured for DHCP. A typical configuration might look like this:network:
version: 2
# renderer: networkd
ethernets:
enp8s0:
dhcp4: true
wifis:
wlp2s0:
dhcp4: true
access-points:
"YOUR_WIFI_SSID":
password: "YOUR_WIFI_PASSWORD"Modify the file to prioritize Ethernet and optionally disable Wi-Fi. For example:
network:
version: 2
# renderer: networkd
ethernets:
enp8s0:
dhcp4: true
wifis:
wlp2s0:
dhcp4: false
optional: true
access-points:
"YOUR_WIFI_SSID":
password: "YOUR_WIFI_PASSWORD"dhcp4: true
enables DHCP for the Ethernet interface.dhcp4: false
disables DHCP for Wi-Fi (effectively disabling it).optional: true
ensures the system doesn’t wait for Wi-Fi during boot.
Save the file (Ctrl+O, then Ctrl+X in
nano
). -
Apply the Netplan Configuration
Apply the changes with:sudo netplan apply
This will restart the network services and configure the Ethernet interface.
-
Verify Ethernet Connectivity
Check if the Ethernet interface has received an IP address:ip addr show enp8s0
Look for an IP address under
inet
(e.g.,192.168.x.x
). If no IP is assigned, ensure the Ethernet cable is connected and the router’s DHCP server is active.Test connectivity:
ping 8.8.8.8
If successful, the Ethernet interface is working.
-
Disable Wi-Fi (Optional)
If you want to ensure Wi-Fi is fully disabled, bring the interface down:sudo ip link set wlp2s0 down
The Netplan configuration above (
dhcp4: false
) should prevent Wi-Fi from reconnecting after a reboot. -
Check Network Status
Verify the overall network status:networkctl
You should see
enp8s0
asconfigured
andwlp2s0
asoff
orunmanaged
.